<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title></title>
		<script type="text/javascript">
			window.onload = function() {
				var mybtn = document.getElementById("btn");
				mybtn.onclick = function() {
					var grade = 81;
					if(grade >= 90) {
						console.log('A');
					}else if(grade >= 80){
						console.log("B");
					}else if(grade >= 70){
						console.log("C");
					}else if(grade >= 60){
						console.log("D");
					}else{
						console.log("不及格");
					}
				console.log("程序继续执行...")
					
				}
			}
		</script>
	</head>

	<body>
		<input type="button" value="点我" id="btn" />
	</body>

</html>